/****************************************************************************
 *   Copyright (C) 2008 by 7552                                             *
 *   fiubataller2-08c1@gruposyahoo.com.ar                                   *
 *                                                                          *
 *  Licensed under the Apache License, Version 2.0 (the "License");         *
 *  you may not use this file except in compliance with the License.        *
 *  You may obtain a copy of the License at                                 *
 *                                                                          *
 *      http://www.apache.org/licenses/LICENSE-2.0                          *
 *                                                                          *
 *  Unless required by applicable law or agreed to in writing, software     *
 *  distributed under the License is distributed on an "AS IS" BASIS,       *
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.*
 *  See the License for the specific language governing permissions and     *
 *  limitations under the License.                                          *
 *                                                                          *
 ***************************************************************************/

#ifndef __ERROR_CODES_H__
#define __ERROR_CODES_H__

namespace Taller2
{
	const int NO_ERROR = 0;
	const int ERR_ROLLBACK = -101;
	const int ERR_PREWRITE = -102;

	namespace TransRec
	{
		const int NO_ERROR = 0;
		const int ERR_FILE_READING = -1;
		const int ERR_NO_MEMORY		= -2;
		const int ERR_FILE_WRITING = -3;
		const int ERR_NO_ENOUGH_SPACE = -4;
		const int ERR_FLUSHING = -5;
		const int BEGIN_OF_FILE = -5;

		inline bool IsSuccess(const int &result)
		{
			return (result == NO_ERROR);
		};
	};
};

#endif
